﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebAppDemo.AjaxPage
{
    public class Commmon 
    {
        public const string action = "Post";
        public const string URL = "~/Feedback.ashx";

    }
    /// <summary>
    /// Summary description for Feedback
    /// </summary>
    public class Feedback : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var name = context.Request["userName"];
            ResultInfo ri = new ResultInfo(1, "Update Secuess", System.DateTime.Now);


            context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(ri));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
    public class ResultInfo
    {
        public int StatusCode { get; set; }
        public string Info { get; set; }
        public DateTime CreateDateTime{get;set;}

        public ResultInfo() { }

        public ResultInfo(int code,string info,DateTime dt)
        {
            StatusCode = code;
            Info = info;
            CreateDateTime = dt;
        }
    }
}